#include<bits/stdc++.h>
using namespace std;
int main(){
	freopen("apple.in" , "r" , stdin);
	freopen("apple.out" , "w" , stdout);
	int a , b , c , d , e , f , g , h , i , j , m , n = 0;
	cin >> a >> b >> c >> d >> e >> f >> g >> h >> i >> j;
	cin >> m;
	if(a <= m + 30) n++;
	if(b <= m + 30) n++;
	if(c <= m + 30) n++;
	if(d <= m + 30) n++;
	if(e <= m + 30) n++;
	if(f <= m + 30) n++;
	if(g <= m + 30) n++;
	if(h <= m + 30) n++;
	if(i <= m + 30) n++;
	if(j <= m + 30) n++;
	cout << n << endl;
	return 0;
}